package com.newly.center.sys.service.domain.impl;

import cn.hutool.core.util.ObjectUtil;
import com.newly.common.base.entity.sys.domain.po.DomainPo;
import com.newly.common.mapper.sys.DomainMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @program: newly-parent
 * @remark: 域
 * @author: guan
 * @create: 2022-01-14 09:59
 */
public class AbstractDomainService {
    @Autowired
    protected DomainMapper domainMapper;

    protected List<Integer> parseIds(List<DomainPo> domainPos) {
        if (ObjectUtil.isEmpty(domainPos)) return null;
        return domainPos.stream().map(DomainPo::getId).collect(Collectors.toList());
    }
}
